package com.xs.project.controller;

import com.xs.project.common.Result;
import com.xs.project.pojo.vo.StudentDeviceRequest;
import com.xs.project.pojo.vo.resp.StudentCourseDeviceResp;
import com.xs.project.pojo.vo.resp.SysMsgResp;
import com.xs.project.service.SysMsgService;
import com.xs.project.service.UserCourseDeviceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/device")
@Api(tags = "学生意见")
public class UserCourseDeviceController {
    @Resource
    private UserCourseDeviceService userCourseDeviceService;

    @ApiOperation(value = "列表-学生意见", notes = "学生意见")
    @PostMapping(value = "/selectStudentDevices")
    public Result<List<StudentCourseDeviceResp>> selectStudentDevices(StudentDeviceRequest req) {
        return userCourseDeviceService.selectStudentDevices(req);
    }

    @ApiOperation(value = "列表-学生意见", notes = "学生意见")
    @PostMapping(value = "/insertDeviceList")
    public Result<Boolean> insertDeviceList(StudentCourseDeviceResp req) {
        return userCourseDeviceService.insertDeviceList(req);
    }

    @ApiOperation(value = "列表-学生意见", notes = "学生意见")
    @PostMapping(value = "/updateDeviceList")
    public Result<Boolean> updateDeviceList(StudentCourseDeviceResp req) {
        return userCourseDeviceService.updateDeviceList(req);
    }
}
